import 'package:flutter/material.dart';
import 'package:photoxia/compant/Kbutton.dart';
import 'package:photoxia/compant/Kbuttonwhite.dart';
import 'package:photoxia/screen/SignUp.dart';

import '../compant/Appcolor.dart';
import '../compant/Dividingline.dart';
import '../compant/Log_card.dart';
import '../compant/signTextField.dart';
import 'Forgotpassword.dart';

class LogAccount extends StatefulWidget {
  const LogAccount({super.key});

  @override
  State<LogAccount> createState() => _LogAccountState();
}

class _LogAccountState extends State<LogAccount> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Padding(
        padding: const EdgeInsets.all(30.0),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Text(
              "Log in to your Account",
              style: TextStyle(color: textColor, fontSize: 26),
              textAlign: TextAlign.center,
            ),
            Text(
              "'Being the savage's bowsman,\n that is, the.",
              style: TextStyle(color: textGaryColor, fontSize: 16),
              textAlign: TextAlign.center,
            ),
            const SizedBox(
              width: double.infinity,
            ),
            const signTextField(
              text: 'Email',
            ),
            TextField(
              cursorColor: fieldBlueColor,
              decoration: InputDecoration(
                suffix: Image.asset('assets/fieldicon.png'),
                hintText: 'Email',
                hintStyle: TextStyle(color: fieldBlueColor),
                focusedBorder: UnderlineInputBorder(
                    borderSide: BorderSide(color: fieldBlueColor)),
                border: UnderlineInputBorder(
                    borderSide: BorderSide(color: fieldBlueColor)),
              ),
            ),
            Kbutton(
              ontap: () {
                Navigator.push(context,
                    MaterialPageRoute(builder: (BuildContext context) {
                  return const SignUp();
                }));
              },
              text: 'Log in',
            ),
            Kbuttonwhite(
                ontap: () {
                  Navigator.push(context,
                      MaterialPageRoute(builder: (BuildContext context) {
                    return const Forgotpassword();
                  }));
                },
                text: 'Forgot password?'),
            const Dividingline(),
            const Log_card(
              image: 'assets/facebook.png',
              color: Color(0xff3B5998),
              text: 'Sign Up with Facebook',
            ),
            const Log_card(
              image: 'assets/emile.png',
              color: Color(0xffF44336),
              text: 'Sign Up with Gmail',
            ),
            const Log_card(
              image: 'assets/X.png',
              color: Color(0xff55ACEE),
              text: 'Sign Up with X',
            )
          ],
        ),
      ),
    );
  }
}
